home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0411.ZIP
/
KEYS.C
< prev
next >
Wrap
Text File
|
1985-07-22
|
390b
|
16 lines
/*
* Program to read the keyboard and return the hex and decimal equivalents.
*/
#include "stdio.h"
main()
{
int c;
puts("Press a key to find its hex and decimal codes (^Z to exit)\n");
while ((c = getchar()) != EOF)
{
printf("\r%c is: %xH and %u\n\n",c,c,c);
puts("Press a key to find its hex and decimal codes (^Z to exit)\n");
}
exit(0);
}